﻿using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;

namespace DotNetStar.TheKing.Domain.Migrations
{
    public partial class V3_1_Category : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AuthorUserName",
                table: "Contents");

            migrationBuilder.DropColumn(
                name: "BestCommentId",
                table: "Contents");

            migrationBuilder.DropColumn(
                name: "IsLockComment",
                table: "Contents");

            migrationBuilder.DropColumn(
                name: "UserCategoryId",
                table: "Contents");

            migrationBuilder.DropColumn(
                name: "AuthorUserName",
                table: "ContentComments");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "AuthorUserName",
                table: "Contents",
                maxLength: 30,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<Guid>(
                name: "BestCommentId",
                table: "Contents",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsLockComment",
                table: "Contents",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<int>(
                name: "UserCategoryId",
                table: "Contents",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AuthorUserName",
                table: "ContentComments",
                maxLength: 30,
                nullable: false,
                defaultValue: "");
        }
    }
}
